package com.ncu.cloundeoffice.mapper;

import com.ncu.cloundeoffice.pojo.TRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface TAdminRoleMapper {
    /**
     * 获取所有的角色
     * @return
     */
    List<TRole> getAllRoles();

    /**
     * 删除操作员的角色
     * @param adminId
     */
    void deleteAllRoleByTAdmin(int adminId);


    /**
     * 添加操作员角色
     * @param adminId
     * @param rid
     * @return
     */
    int insertTAdminRole(@Param("adminId") int adminId, @Param("rids") int[] rids);
}
